﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RateThisAppCommand.cs" company="Nokia Developer Wiki">
//   Copyright (c) 2013 Nokia Developer Wiki. All rights reserved.
// </copyright>
// <summary>
//   The rate this app command.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace NokiaDev.RadControlsSample.Commands
{
    using System;
    using System.Windows.Input;

    using Microsoft.Phone.Tasks;

    /// <summary>
    /// The rate this app command.
    /// </summary>
    public class RateThisAppCommand : ICommand
    {
        /// <summary>
        /// The can execute changed.
        /// </summary>
        public event EventHandler CanExecuteChanged;

        /// <summary>
        /// The can execute.
        /// </summary>
        /// <param name="parameter">
        /// The parameter.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public bool CanExecute(object parameter)
        {
            return true;
        }

        /// <summary>
        /// The execute.
        /// </summary>
        /// <param name="parameter">
        /// The parameter.
        /// </param>
        public void Execute(object parameter)
        {
            var reviewTask = new MarketplaceReviewTask();
            reviewTask.Show();
        }
    }
}
